---
title: "SQL-VP-025: Look up external client email address (SQL Server)"
summary: Looks up an external client's email address by ID and last name via a SQL Server stored procedure.
status: draft
owner: SAIF Claims BOF team
last_reviewed: 2026-08-21
library: SAIF.Business.View.Policy
reference_type: embedded
---

# SQL-VP-025 Look up external client email address (SQL Server)

Used by `clsTeamAssignment.InitializeEmailAddress()`, executed against an externally-supplied SQL
Server `IDataPortalInfo` (`inEmailAddressDPI`) — not the internally-built `m_dpiSQL` used elsewhere in
`clsPolicySecurity`.*

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-VP-025 |
| **Operation type** | Read |
| **Execution method** | Stored procedure |
| **Database** | SQL Server |
| **Schema** | `[unqualified]**` |
| **Command type** | StoredProcedure |
| **Business object** | `clsTeamAssignment` |
| **Criteria property** | `InitializeEmailAddress()` (ad hoc method) |
| **Lifecycle method** | ad hoc method |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `@idNum` | Input | String/ID | N/A | External client identifier. |
| `@clientLastname` | Input | String | N/A | Client last name used to disambiguate the lookup. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| *(not directly visible — encapsulated in procedure body)* | SELECT | N/A |

## Sample SQL

```sql
EXEC cp_external_client_lookup
  @idNum          = :idNum,
  @clientLastname = :clientLastname
```

*Executed against an externally-supplied SQL Server `IDataPortalInfo` (`inEmailAddressDPI`), not the
internally-built `m_dpiSQL` used by `clsPolicySecurity`.*

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- `SAIF.Business.View.Policy\clsTeamAssignment.vb`
